<?PHP
ini_set("memory_limit","128M");
$post=$_POST;
$media = new media;
$media->post=$post;
$media->files=$_FILES;
$media->input['raw']='upload_image';
if($post['resize_image']==1 && !empty($post['resize_x']) && !empty($post['resize_y']))
{
	

	$media->input['resize_x']=$post['resize_x'];
	$media->input['resize_y']=$post['resize_y'];
	$media->resize_image=true;	
}


if($post['resize_thumb']==1 && !empty($post['resize_x_thumb']) && !empty($post['resize_y_thumb']))
{
	$media->input['resize_x_thumb']=$post['resize_x_thumb'];
	$media->input['resize_y_thumb']=$post['resize_y_thumb'];
	$media->resize_thumb=true;	
}
$image_data=$media->process_image();


?>